import { Component, Input, OnInit } from '@angular/core';
import { AppGlobalService } from 'src/app/shared/service/app-global.service';


@Component({
  selector: 'app-apply-to-open-shop',
  templateUrl: './apply-to-open-shop.component.html',
  styleUrls: ['./apply-to-open-shop.component.scss'],
})
export class ApplyToOpenShopComponent implements OnInit {


  @Input() tagData: any;
  contentArray: any;
  constructor(public appGlobalService: AppGlobalService) { }

  ngOnInit() {
    try {
      if (this.tagData.data.content) {
        this.contentArray = this.tagData.data.content.split('paragraph');
        console.log(JSON.stringify(this.contentArray));
      }
    } catch (error) {

    }
  }

  gotoPage(opt) {
    if (opt) {
      const subParams = {
        pageId: opt.target,
        params: opt.params,
        sessionId: localStorage.getItem("sessionId")
      };
      this.appGlobalService.goToForward(subParams);
    }

  }

}
